package org.qiyu.live.id.generate.provider.rpc;

import jakarta.annotation.Resource;
import org.apache.dubbo.config.annotation.DubboService;
import org.qiyu.live.id.generate.interfaces.IdBuilderRpc;
import org.qiyu.live.id.generate.interfaces.IdGenerateRpc;
import org.qiyu.live.id.generate.provider.service.IdGenerateService;

/**
 * @ClassName: IdGenerateRocImpl
 * @Description: TODO
 * @Author zhangguangyan
 * @Date 2023/07/30/ 10:39:48
 * @Version 1.0
 */
@DubboService
public class IdGenerateRpcImpl implements IdGenerateRpc {

    @Resource
    private IdGenerateService idGenerateService;

    @Override
    public Long getSeqId(Integer code) {
        return idGenerateService.getSeqId(code);
    }

    @Override
    public Long getUnSeqId(Integer code) {
        return idGenerateService.getUnSeqId(code);
    }
}

